package cn.kpi.dao.attendance;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.kpi.common.persistence.MyBatisDao;
import cn.kpi.entity.attendance.AttDetailEntity;
import cn.kpi.entity.attendance.AttSummaryEntity;
import cn.kpi.entity.attendance.AttTbBatchEntity;

@MyBatisDao
public interface AttTbDao {
    public int InsertAttSummary(AttSummaryEntity entity) throws Exception;

    public int InsertAttDetail(AttDetailEntity entity) throws Exception;

    public List<AttSummaryEntity> GetAttTbListByWhere(@Param("where") String where) throws Exception;

    public List<AttSummaryEntity> GetAttTbListByUser(@Param("where") String where, @Param("orgid") String orgid) throws Exception;

    public List<AttSummaryEntity> GetAttTbListNotUser(@Param("where") String where, @Param("orgid") String orgid) throws Exception;

    public int GetAttTbListCountByWhere(@Param("where") String where) throws Exception;

    public int UpdateApproverUser(@Param("approverUserid") Long approverUserid,  @Param("orgsummaryid") Long orgsummaryid);

    public int InsertAttDetailBatch(@Param("list") List<AttDetailEntity> list, @Param("sattsummaryid") Long sattsummaryid) throws Exception;

    public AttSummaryEntity GetAttTbSummaryByWhereForMzpd(@Param("where") String where) throws Exception;

    public List<AttSummaryEntity> GetAttTbSummaryListByWhereForMzpd(@Param("where") String where) throws Exception;


    public int InsertAttSummaryByOrgId(AttTbBatchEntity entity) throws Exception;

    public int  InsertAttSummaryByUserId (AttTbBatchEntity entity) throws Exception;

    public int InsertAttDetailBatchByDays(@Param("list") List<Integer> list, @Param("entity") AttTbBatchEntity entity) throws Exception;

    public int UpdateSuyIdBatch(AttTbBatchEntity entity) throws Exception;

    public AttSummaryEntity GetAttTbAttsummaryById(@Param("attsummaryid") Long attsummaryid) throws Exception;

    public List<AttSummaryEntity> GetAttTbListByWhereOrderBy(@Param("where") String where) throws Exception;

    public int UpdateAttKH(@Param("orgsummaryid") Long orgsummaryid,@Param("szdw") Long szdw,@Param("rsgxszdw") Long rsgxszdw, @Param("szdwname")String szdwname, @Param("rsgxszdwname")String rsgxszdwname,@Param("attsummaryid") Long attsummaryid) throws Exception;

    public int deleteKQ(@Param("attsummaryid") Long attsummaryid);
}
